<template>
 <div class="tabbar">
    <van-tabbar :route="true" inactive-color="#333" active-color="#DD1A21" >
      <van-tabbar-item to="/home" icon="shouye" icon-prefix="icon" >首页</van-tabbar-item>
      <van-tabbar-item to="/cate" icon="fenlei" icon-prefix="icon" >分类</van-tabbar-item>
      <van-tabbar-item to="/cart" icon="gouwuche" icon-prefix="icon" :badge="token? $store.state.cart.buyNumber || '' : '' ">购物车</van-tabbar-item>
      <van-tabbar-item to="/user" icon="wode" icon-prefix="icon" >我的</van-tabbar-item>
    </van-tabbar>
 </div>
</template>

<script>
import { getToken } from '_utils'
export default {
  data () {
    return {
      token: getToken()
    }
  },
  created () {

  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.tabbar{
  /deep/.van-tabbar-item__icon{
    .icon{
      font-size: 24px;
    }
  }
}
</style>
